﻿//////////////////////////////////////////////////////////////////////////////
//
//  Copyright © 1998-2024 Glodon Company Limited.  All rights reserved.
//
//  Use of this software is subject to the terms of the Glodon license
//  agreement provided at the time of installation or download, or which
//  otherwise accompanies this software in either electronic or hard copy form.  
//
//////////////////////////////////////////////////////////////////////////////

#pragma once
#include <string>
#include <vector>
#include "GbmpGuid.h"
#include "GmFamilyDataStandard.h"

namespace gfam
{
    // \brief 领域对象接口
    class GM_FAMILY_DATA_STANDARD_EXPORT IFamilyPropertyDefinition
    {
    public:
        virtual ~IFamilyPropertyDefinition() = 0 {}

        /// \brief 获取属性的id,这个id是自动分配的自增id,不具有业务意义
        /// 
        /// \return 返回id
        virtual int GetId() const = 0;

        /// \brief 获取属性的uid
        /// 
        /// \return 返回uid
        virtual std::wstring GetUid() const = 0;

        /// \brief 获取属性所属的类别id，这个id是自增id
        /// 
        /// \return 返回类别id
        virtual int GetDirectoryId() const = 0;

        /// \brief 获取属性code
        /// 
        /// \return 返回code
        virtual std::wstring GetCode() const = 0;

        /// \brief 获取属性name
        /// 
        /// \return 返回name
        virtual std::wstring GetName() const = 0;

        /// \brief 获取属性groupName
        /// 
        /// \return 返回name
        virtual std::wstring GetGroupName() const = 0;

        /// \brief 获取属性值类型
        /// 
        /// \return 返回值类型
        virtual int GetValueType() const = 0;

        /// \brief 获取属性枚举值列表
        /// 
        /// \return 返回枚举值列表
        virtual std::vector<std::pair<std::wstring, std::wstring>> GetValues() const = 0;

        /// \brief 是否是实例属性
        /// 
        /// \return 返回bool
        virtual bool IsInstance() const = 0;

        /// \brief 是否是必须参数
        /// 
        /// \return 返回bool
        virtual bool IsEssential() const = 0;
    };
}